import { getInfo, setInfo } from '@/utils/storage'
export default {
  namespaced: true,
  state () {
    return {
      userInfo: getInfo()
    }
  },
  mutations: {
    setUserInfo (state, user) {
      state.userInfo.token = user.token
      state.userInfo.userId = user.userId
      state.userInfo.addNum = user.addNum

      setInfo(state.userInfo)
    }
  },
  modules: {
    // 嵌套模块
  },
  actions: {

  },
  getters: {

  }
}
